﻿/**********************************************************************
 * @file   FITKAcousticsFEFace.h
 * @brief  FE面数据声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2024-12-16
 *********************************************************************/
#ifndef _FITK_ACOUSTICS_FE_FACE_H___
#define _FITK_ACOUSTICS_FE_FACE_H___
 
#include "FITKAcousticsModelAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"

namespace Acoustics
{
    class FITKAcousticsTriangles;
    /**
     * @brief  FE面数据类
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-12-13
     */
    class FITKAcousticsModelAPI FITKAcousticsFEFace : public Core::FITKAbstractNDataObject
    {
        Q_OBJECT

    public:
        /**
         * @brief Construct a new FITKAcousticsFEFace object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        explicit FITKAcousticsFEFace();
        /**
         * @brief Destroy the FITKAcousticsFEFace object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        virtual ~FITKAcousticsFEFace();
        /**
         * @brief    获取三角形列表
         * @return   FITKAcousticsTriangles *
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-16
         */
        FITKAcousticsTriangles* getTriangleMesh();
        /**
         * @brief    获取节点ID列表
         * @return   QList<int>
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-16
         */
        QList<int> getNodeIDs() const;
        /**
         * @brief    是否包含点
         * @param[i] id 
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2024-12-16
         */
        bool isContainsNode(const int id) const;
        /**
         * @brief    获取边界点ID
         * @return   QList<int>
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-27
         */
        QList<int> getBoundaryNodeID();
        /**
         * @brief    设置单元之后调一下更新边界点接口
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-27
         */
        bool updateBoundaryNode();

    protected:
        /**
         * @brief  三角形列表
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-16
         */
        FITKAcousticsTriangles* _triMesh{};
        /**
         * @brief  边界点
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-27
         */
        QList<int> _boundaryNodeID{};
    };


    /**
     * @brief FE面管理器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-12-13
     */
    class FITKAcousticsModelAPI FITKAcousticsFEFaceManager : public Core::FITKAbstractDataObject,
        public Core::FITKAbstractDataManager<FITKAcousticsFEFace>
    {
        FITKCLASS(Acoustics, FITKAcousticsFEFaceManager);
    public:
        /**
         * @brief Construct a new FITKAcousticsFEFaceManager object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        explicit FITKAcousticsFEFaceManager() = default;
        /**
         * @brief Destroy the FITKAcousticsFEFaceManager object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        virtual ~FITKAcousticsFEFaceManager() = default;

    };

}


#endif
